Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use NODE_PATH on module resolution #274

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zetavg
Copy link
Contributor

@zetavg zetavg commented Apr 27, 2019

Search the NODE_PATH environment variable for modules if they are not found elsewhere, just like Node.js.

Note: Currently BuckleScript doesn't support $NODE_PATH either, it checks "$npm_config_prefix/lib/node_modules" instead (which I don't know the reason of doing so). Maybe we should support that too/instead.

@jaredly
Copy link
Owner

jaredly commented Jun 25, 2019

I'm wary of behavior that doesn't match bucklescript's resolution -- would this even be useful if bucklescript won't compile the module?

@jaredly
Copy link
Owner

jaredly commented Aug 3, 2019

I think this is relevant again, now that bucklescript has added support for NODE_PATH rescript-lang/rescript-compiler#3708
@zetavg do you have an example repo/setup I can use to verify this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants